package com.example.flight.generate;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Author: leo
 * @date: 2021/7/5
 */
@NoArgsConstructor
@Data
public class TuNiuFlightDetail {

    private int code;
    private String msg;
    private String timestamp;
    private DataBean data;

    @NoArgsConstructor
    @Data
    public static class DataBean {
        private String flightId;
        private List<FlightInfosBean> flightInfos;
        private List<ResourceInfosBean> resourceInfos;

        @NoArgsConstructor
        @Data
        public static class FlightInfosBean {
            private String departureTime;
            private String aPortName;
            private String dCityName;
            private int totalTransfer;
            private String transferTime;
            private String flightNos;
            private int transferTag;
            private String airPorts;
            private String dPortName;
            private String dTerminal;
            private String arrivalDate;
            private String airCodes;
            private String duration;
            private int crossDay;
            private String arrivalTime;
            private String departureDate;
            private String aCityName;
            private String aTerminal;
            private List stopPoints;
            private List<SegmentsBean> segments;

            @NoArgsConstructor
            @Data
            public static class SegmentsBean {
                private String departureTime;
                private String carrierAirlineCode;
                private String aPortName;
                private String dCityName;
                private String airlineCompany;
                private String onTimeRate;
                private int stopNum;
                private String seatTypeCode;
                private String dPortName;
                private String aPortIataCode;
                private String duration;
                private String stopInformation;
                private String dCityIataCode;
                private String arrivalTime;
                private String codeShare;
                private String dPortIataCode;
                private String departureDate;
                private String aCityName;
                private String aTerminal;
                private String airComImageUrl;
                private String craftTypeName;
                private boolean throughTag;
                private String depCityPoiCode;
                private String arrCityPoiCode;
                private int planeModel;
                private String craftType;
                private boolean sharedFlight;
                private String airlineIataCode;
                private String dTerminal;
                private String flightYear;
                private String arrivalDate;
                private String aCityIataCode;
                private int crossDay;
                private String flightNo;
                private int imgFlag;
                private String carrierAirlineShortName;
                private String avgDelayTime;
                private String flightTime;
                private int isCover;
                private List stopPoints;
            }
        }

        @NoArgsConstructor
        @Data
        public static class ResourceInfosBean {
            private String applyType;
            private String groupDescribe;
            private SaleControlBean saleControl;
            private int drawTicketTime;
            private String groupId;
            private int cabinStatus;
            private String vendorId;
            private int flightType;
            private String aduDivideBaby;
            private String aduDivideChdBaby;
            private String groupName;
            private String applyTypeName;
            private String aduDivideBabyText;
            private String aduDivideChdBabyText;
            private int protocolOrder;
            private String iconPath;
            private TotalPriceDetailBean totalPriceDetail;
            private String priceInfoId;
            private List<FareDetailsBean> fareDetails;
            private List<JourneyPricesBean> journeyPrices;

            @NoArgsConstructor
            @Data
            public static class SaleControlBean {
                private String maxPsgCnt;
                private String ageLimitText;
                private String minPsgCnt;
                private String psgCntText;
                private List<PsgTypeLimitBean> psgTypeLimit;

                @NoArgsConstructor
                @Data
                public static class PsgTypeLimitBean {
                    private String allowPsgType;
                    private int maxCnt;
                    private int minCnt;
                    private List allowIdType;
                }
            }

            @NoArgsConstructor
            @Data
            public static class TotalPriceDetailBean {
                private int adultAirportTax;
                private int gmjcPrice;
                private int avgPrice;
                private int adultPrice;
                private int childSalePrice;
                private int discount;
                private int childAirportTax;
                private int adultDiscount;
                private int gmjcFuleTax;
                private int adultSalePrice;
                private int childFuleTax;
                private int babyPrice;
                private int gmjcSalePrice;
                private int adultFuleTax;
                private int babyFuleTax;
                private int avgPriceWithTax;
                private int babyAirportTax;
                private int babySalePrice;
                private int economyFullPrice;
                private int childPrice;
                private int gmjcAirportTax;
            }

            @NoArgsConstructor
            @Data
            public static class FareDetailsBean {
                private int floorPrice;
                private int fuleTax;
                private int baseFare;
                private String psgType;
                private String specCabinStatusChange;
                private int airportTax;
                private int orgPrice;
                private String specVendorId;
                private List<JourFareDetailsBean> jourFareDetails;

                @NoArgsConstructor
                @Data
                public static class JourFareDetailsBean {
                    private int fuleTax;
                    private int baseFare;
                    private String policyId;
                    private int policyType;
                    private int airportTax;
                }
            }

            @NoArgsConstructor
            @Data
            public static class JourneyPricesBean {
                private int drawTicketTime;
                private PriceDetailBean priceDetail;
                private String cabinTypeName;
                private String mealName;
                private List<SegmentPricesBean> segmentPrices;

                @NoArgsConstructor
                @Data
                public static class PriceDetailBean {
                    private int adultAirportTax;
                    private int gmjcPrice;
                    private int avgPrice;
                    private int adultPrice;
                    private int childSalePrice;
                    private int discount;
                    private int childAirportTax;
                    private double adultDiscount;
                    private int gmjcFuleTax;
                    private int adultSalePrice;
                    private int childFuleTax;
                    private int babyPrice;
                    private int gmjcSalePrice;
                    private int adultFuleTax;
                    private int babyFuleTax;
                    private int avgPriceWithTax;
                    private int babyAirportTax;
                    private int babySalePrice;
                    private int economyFullPrice;
                    private int childPrice;
                    private int gmjcAirportTax;
                }

                @NoArgsConstructor
                @Data
                public static class SegmentPricesBean {
                    private String cabinClass;
                    private int cabinStatus;
                    private int fullPrice;
                    private int cabinType;
                    private String cabinCode;
                    private boolean freeBaggage;
                    private int infCabinStatus;
                    private String seatClassDesc;
                    private String specCabinCode;
                    private String seatAliasName;
                    private String actionCode;
                    private int specCabinStatus;
                    private String baggageInfoCHD;
                    private String mealName;
                    private String baggageInfo;
                    private String mealCode;
                    private String baggageInfoBaby;
                }
            }
        }
    }
}
